import React from 'react'
import { getCartxqApi } from '../../api/cart'
import { Button } from 'antd-mobile'
import { useNavigate } from 'react-router-dom'
import { NavBar, Space, Toast } from 'antd-mobile'

function Index() {
  let nav=useNavigate()
  return (
    <div>
      <div style={{background:'#fff780'}}> 
        <NavBar onBack={()=>nav(-1)}> 车次详情 </NavBar></div>

      
      <Button onClick={()=>nav('/message')}>
      预约抢票
      </Button>

    </div>
  )
}

export default Index
// export const loader=async ({requset,params})=>{\
//   console.log(params)
  
//   const id=params.is
//   const url=new URL(requset.url)
//    const data=Object.fromEntries(url.searchParams)
//    console.log(data);
//    const {data:res}=await getCartxqApi()
//    console.log(res);
// }